package discovery

import "strings"

// FetchServiceName 从key提取服务名称
func FetchServiceName(key string) string {
	slKey := strings.Split(key, "/")
	if len(slKey) != 2 {
		return ""
	}

	return slKey[0]
}
